/*
 * @Author: ChaiHongJun
 * @Date: 2021-07-07 20:49:18
 * @LastEditors: ChaiHongJun
 * @LastEditTime: 2021-07-15 10:00:28
 * @version:
 * @Description:
 */
import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Layout",
    component: () => import("@/views/layout/Index.vue"),
    children: [
      {
        path: "",
        name: "Home",
        component: () => import("@/views/home/Index.vue"),
      },
      {
        path: "qa",
        name: "Qa",
        component: () => import("@/views/qa/Index.vue"),
      },
      {
        path: "video",
        name: "Video",
        component: () => import("@/views/video/Index.vue"),
      },
      {
        path: "my",
        name: "My",
        component: () => import("@/views/my/Index.vue"),
      },
    ],
  },
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/Index.vue"),
  },
  {
    path: "/detail/:id",
    name: "Detail",
    component: () => import("@/views/detail/Index.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
